
export function formatDate(d){
    var date = new Date(parseInt(d) );
    var Year = date.getFullYear();
    var Moth = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1);
    var Day = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate());
    var  GMT =  Year + '-' + Moth + '-' + Day;
    return GMT
}

export function formatTimeToSec(time) {
    var arr = time.split(':');
    return (parseFloat(arr[0]) * 60 + parseFloat(arr[1])).toFixed(2);
}